(in category theory/type theory/computer science)
of all homotopy types
of (-1)-truncated types/h-propositions
natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
In type theory, a type universe – usually written or – is a type whose terms are either themselves types (Russell universes), or representations of types in an internal model of the type theory (Tarski universes). Either way, it is a universe of (small) types, a universe in type theory, and sometimes called a type of types.
One also speaks of as being a reflection of the type system in itself (e.g. MartinLöf 74, p. 6, Palmgren, pp. 2-3, Rathjen, p. 1, Luo 11, section 2.5, Luo 12, p. 2, Stanf. Enc. Phil.), following the reflection principle in set theory.
In homotopy type theory a type of (small) types is what in higher categorical semantics is interpreted as a (small) object classifier. Thus, the type of types is a refinement of the type of propositions which only contains the (-1)-truncated/h-level-1 types (and is semantically a subobject classifier).
In the presence of a type universe a judgement of the form
says that is a term of type , hence is either a (small) type itself (for Russell universes), or a representation of types in an internal model of the type theory (for Tarski universes).
More generally, in Russell universes a hypothetical judgement of the form
says that is an -dependent type.
In Tarski universes the corresponding hypothetical judgment would be of the form
Type universes are important in dependent type theory for numerous reasons:
Dependent type theory with a separate type judgment serves as a background for a variety of foundations of mathematics via the propositions as some types interpretation of dependent type theory: One can add a von Neumann universe to the dependent type theory and work entirely in the von Neumann universe for material set theory; one can add a category of sets to the dependent type theory and work entirely in the category of sets for structural set theory; and one can add a type of all propositions and a natural numbers type and work in the dependent type theory itself for higher-order logic. For univalent type theory and univalent foundations, on the other hand, one needs to add a type universe satisfying certain axioms and axiom schemata, such as universe extensionality, closure under identity types, closure under dependent sum types, closure under dependent product types, propositional resizing, replacement, infinity, and choice, to the dependent type theory.
In set theory, one could usually quantify over sets using the universal quantifier and the existential quantifier. However, in dependent type theory, one could only quantify over elements of types. Without type universes, types are not elements of type universes, but rather judged separately as a type, and thus it is impossible to quantify over types. Quantification over types is necessary for proving universal properties of various mathematical structures, such as that the integers are the initial commutative ring.
Having a hierarchy of universes where every type is an element of the hierarchy, instead of a single separate type judgment has its own benefits. These includes the lack of annotations in defining types, since all types are elements of universes and all family of types are elements of function types ; the lack of additional rules for judgmental equality in type theories with judgmental equality, since they are all admissible; the ease of definitions of types in objective type theory which does not have judgmental equality; and the lack of separate type judgments for modes in split context modal type theory. However, this comes at the cost of having to formalize the theory of universe levels of the hierarchy of universes before formalizing the type theory.
In homotopy type theory the type universe is often assumed to satisfy the univalence axiom. This is a reflection of the fact that in its categorical semantics as an object classifier is part of an internal (∞,1)-category in the ambient (∞,1)-topos: the one that as an indexed category is the small codomain fibration.
Per Martin-Lof‘s original type theory contained a Russell universe which contained all types, which therefore in particular contained itself, i.e. one had . But it was pointed out by Jean-Yves Girard that this was inconsistent; see Girard's paradox. Thus, modern type theories generally contain a hierarchy of universes.
A Russell universe or universe à la Russell is a type whose terms are types. In the presence of a separate judgment “”, this can be formulated as a deduction rule of the form
Thus, the type formers have rules saying which universe they belong to, such as:
With Russell universes, we can also omit the judgment “” and replace it everywhere by a judgment that A is a term of some universe. This is the approach taken in UFP13.
A Tarski universe or a universe à la Tarski (Hofmann, section 2.1.6, Luo 12, Gallozzi 14, p. 40) is a type together with an “interpretation” operation allowing us to regard its terms as codes or names for actual types. Thus we have a rule such as
saying that for each term of the type universe there is an actual type . This is the approach taken by Egbert Rijke‘s Introduction to Homotopy Type Theory.
Conversely, with notation as used at object classifier in an (infinity,1)-topos, one might write to indicate that is the name of the type in the type universe.
We usually also have operations on the universe corresponding to (but not identical to) type formers, such as
with an equality . Usually this latter equality (and those for other type formers) is a judgmental equality. If it is only an equivalence (i.e. we have a rule which gives us a canonical term of the equivalence type), we may speak of a weakly Tarski universe (Gallozzi 14, p. 49-50).
We can give a slightly different definition of weakly Tarski universe using propositional equality and a larger universe. More precisely, we can consider two (or many) universes and with the usual rules for the relative reflection for any , a choice of weakly or strongly Tarski computation rules for the reflections and , and a computation rule for the relative reflection el of inside based on propositional equality, which gives us canonical elements of the identity types and similarly for the other type formers.
If the containing universe is univalent the two definitions turn out to coincide.
The three notions of Tarski universe can be ordered by generality: Every Tarski universe is weakly Tarski by equivalences, because both definitional equality of types and the identity types between two types imply that the two types of equivalent . Similarly, every strict Tarski universe is weakly Tarski by the identity type, because definitional equality of types implies that two types are identified .
Since each type former is independent of each other, one could also have mixed versions of Tarski universes, where some of the type formers are strictly Tarski and some are weakly Tarski. This leads to possible Tarski universes, where is the number of type formers in a type theory, and the type theories are only partially ordered by generality. Internally in an ambient universe, that number becomes .
Universes defined internally via induction-recursion are stricty Tarski. Weakly Tarski universes are easier to obtain in semantics (see below): they are somewhat more annoying to use, but probably suffice for most purposes. In objective type theory, there is no definitional equality, so every Tarski universe is weakly Tarski.
There are other universes which one could use. For example, any model of material set theory or structural set theory would suffice. Material set theories become Tarski universes by the type family
and structural set theories become Tarski universes by the type family
where is the terminal separator.
Thus, in a dependent type theory with a separate type judgment, one could simply include inference rules for ZFC or ETCS.
Both Coq and Agda support universe polymorphism to deal with the issue of universe enlargement. Moreover, Coq supports typical ambiguity.
The extensionality principle of type universes is given by the univalence axiom, which for Tarski universes states that transport across the universal type family is an equivalence of types for all small types and ; and for Russell universes states that the recursively defined function , which takes identifications between small types and to equivalences between and , is an equivalence of types for all small types and .
A tower of universes is cumulative if implies (rather than, say, ).
Cumulative Russell universes have some issues; see for instance Luo 12.
Coq uses Russell style universes. For practical purposes, it also has cumulativity, although there is some question (perhaps mainly semantic) of whether this is true internally or whether it uses casts that are simply hidden from the user.
Agda uses non-cumulative Russell style universes.
UFP13 (first edition) uses cumulative Russell style universes.
UnivalentRussell universes have been shown to be interpreted in type-theoretic model categories presenting the base (∞,1)-topos ∞Grpd (Kapulkin-Lumsdaine-Voevodsky 12)
and more generally presenting (∞,1)-toposes of (∞,1)-presheaves over elegant Reedy categories (Shulman 13).
Discussion for general (∞,1)-toposes (of (∞,1)-sheaves) that should have implementation weakly Tarski (Gallozzi 14, p. 49-50) is in (Gepner-Kock 12).
For more on this see the respective sections at relation between type theory and category theory.
There is other notions of type of types. Suppose we have a Russell universe or a Tarski universe and a function . Then the type of -small types which satisfy is given by the dependent sum type for Russell universes and for Tarski universes.
Since universes are internal models of type theory, in a dependent type theory with a separate type judgment, one could generalize the above notion of “type of -small types which satisfy ” to the notion of “type of all types which satisfy ”. Types , previously elements of the universe , are now judged to be types . The function which takes types to propositons is now an operator on types, which is defined using inference rules:
Examples of such definable from the existing type formers in dependent type theory include
The resulting type of types which satisfy is denoted by .
Care must be taken for which one could use to define the type of all types which satisfy . For example, given unit type , for and , the resulting always contains itself or its set truncation in addition to the empty type, resulting in Girard's paradox; thus, one cannot form such types of types in the type theory. Similarly, for
the resulting contains its set truncation in addition to the empty type if the principle of excluded middle holds for all propositions, resulting in Girard's paradox; thus, one could only form for
if one doesn’t have excluded middle in the type theory.
Now, supposing that the dependent type theory has the above rules for , could be presented either as a Russell universe or a Tarski universe in a dependent type theory. The difference between the two is that in the former, every type which satisfies in the type theory is literally an element of the type of types which satisfy , while in the latter, elements of are only indices of a type family ; every finite type in the type theory is only essentially -small for weak Tarski universes or judgmentally equal to an for for strict Tarski universes.
For weak Tarski type of types with satisfy , one also needs the typal congruence rules for forming :
As a strict Tarski universe, the type of all types which satisfy is given by the following natural deduction inference rules:
Formation rules for the type of all types which satisfy :
Introduction rules for the type of all types which satisfy :
Elimination rules for the type of all types which satisfy :
Computation rules for the type of all types which satisfy :
Uniqueness rules for the type of all types which satisfy :
Judgmental computation rules:
Typal computation rules:
Extensionality principle of the type of all types which satisfy :
As a weak Tarski universe, the type of all types which satisfy is given by the following natural deduction inference rules:
Formation rules for the type of all types which satisfy :
Introduction rules for the type of all types which satisfy :
Elimination rules for the type of all types which satisfy :
Computation rules for the type of all types which satisfy :
where the equivalence
is provided from the typal computation rules for .
Uniqueness rules for the type of all types which satisfy :
Judgmental computation rules:
Typal computation rules:
Extensionality principle of the type of all types which satisfy :
As a Russell universe, the type of all types which satisfy is given by the following natural deduction inference rules:
Formation rules for the type of all types which satisfy :
Introduction rules for the type of all types which satisfy :
Elimination rules for the type of all types which satisfy :
Computation rules for the type of all types which satisfy :
Uniqueness rules for the type of all types which satisfy :
Judgmental computation rules:
Typal computation rules:
Extensionality principle of the type of all types which satisfy :
Prop, the type of propositions
Type universes in Martin-Löf type theory originate in un-stratified and hence inconsistent form with
and then in stratified and consistent form in
elaborated on in
which also introduces (p. 48) the distinction into notions of Russell universes and Tarski universes.
Further discussion in
Review and further discussion:
Introduction with an eye towards homotopy type theory:
Definition of weakly Tarski universes:
Martin Hofmann, section 2.1.6 of Syntax and semantics of dependent types (web)
Zhaohui Luo, Notes on Universes in Type Theory, 2012 (pdf)
Cesare Gallozzi, Constructive Set Theory from a Weak Tarski Universe, MSc thesis (2014) (arXiv:1411.5591)
Detailed discussion of the type of types in Coq is in
See also around slide 8 of the survey
A formal proof in homotopy type theory that the type of homotopy n-types is not itself a homotopy -type (it is an -type) is in
(∞,1)-Categorical semantics for univalent type universes is discussed in
Chris Kapulkin, Peter LeFanu Lumsdaine, Vladimir Voevodsky, The Simplicial Model of Univalent Foundations (arXiv:1211.2851)
Michael Shulman, The univalence axiom for elegant Reedy presheaves (arXiv:1307.6248)
David Gepner, Joachim Kock, Univalence in locally cartesian closed ∞-categories (arXiv:1208.1749)
Relation to injective types:
See also
Michael Rathjen, The strength of Martin-Löf type theory with superuniverse. Part I pdf
Stanford Encyclopedia of Philosophy, Type theory – Extensions of type systems, Polymorphism, Paradoxes
Zhaohui Luo, Contextual analysis of word meanings in type-theoretical semantics, in Pogodalla, Prost (eds.) Logical Aspects of Computational Linguistics, 2011 (pdf)
Last revised on May 23, 2024 at 14:21:28. See the history of this page for a list of all contributions to it.